
#include "stdafx.h"
#include "WicColorContext.h"

CWicColorContext::CWicColorContext()
{
    m_pIWICColorContext = NULL;
}

CWicColorContext::~CWicColorContext()
{
    if(m_pIWICColorContext)
    {
        m_pIWICColorContext->Release();
    }
    m_pIWICColorContext = NULL;
}

CWicColorContext::CWicColorContext(CWicColorContext const & objColorContext)
{
    m_pIWICColorContext = objColorContext.m_pIWICColorContext;
    m_pIWICColorContext->AddRef();
}

CWicColorContext& CWicColorContext::operator=(CWicColorContext const & objColorContext)
{
    if(m_pIWICColorContext)
    {
        m_pIWICColorContext->Release();
    }
    m_pIWICColorContext = objColorContext.m_pIWICColorContext;
    m_pIWICColorContext->AddRef();
    return *this;
}
